const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function (app) {
  app.use(createProxyMiddleware('/topic', {
    target: 'http://m.you.163.com',
    secure: false,
    changeOrigin: true,
  }));
  app.use(createProxyMiddleware('/item', {
    target: 'http://m.you.163.com',
    secure: false,
    changeOrigin: true,
  }));
  app.use(createProxyMiddleware('/xhr', {
    target: 'http://m.you.163.com',
    secure: false,
    changeOrigin: true,
  }));
};